import { defHttp } from "@/utils/http";
import { baseUrlApi } from './utils'

export type DetailResult = {
  code: number;
  data: any;
  msg: string;
};

/** 修改盘点单据备注 */
export const setStocktakingOrderUpdate = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/stocktakingOrder/update"),
    data
  });
};

/** 盘点登记 */
export const setStocktakingOrderRegistration = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/stocktakingOrder/registration"),
    data
  });
};

/** 库存盘点单列表带分页 */
export const setStocktakingOrderPageList = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/stocktakingOrder/pageList"),
    data
  });
};

/** 查看盘点明细 */
export const setStocktakingOrderDetail = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/stocktakingOrder/detail"),
    data
  });
};

/** 新增盘点 */
export const setStocktakingOrderAdd = (data?: object) => {
  return defHttp.post<DetailResult>({
    url: baseUrlApi("/stocktakingOrder/add"),
    data
  });
};
